class Notifier < ActionMailer::Base

   #Details for sending emails to referrer and referred
   
   def forgot_password(user)
   	setup_email(user)
   	@subject += 'Forgot your Password?'
   	@body[:url] = "#{$SITE_URL}/reset/#{user.reset_code}"
   end

  def signup_notification(user)
    setup_email(user)
    @subject    += 'User Activation'
  
    @body[:url]  = "#{$SITE_URL}/activate/#{user.activation_code}"
  
  end
  
  def activation(user)
    setup_email(user)
    @subject    += 'Account has been Activated'
    @body[:url]  = "#{$SITE_URL}"
  end
  
  protected
    def setup_email(user)
      @recipients  = "#{user.email}"
      @from        = "notifier@expenses.amberfeng.com"
      @subject     = "[Expendite] "
      @sent_on     = Time.now
      @body[:user] = user
      
    end

end
